<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" th:href="@{/bootstarp/bootstrap.css}">
    <script th:src="@{/js/jquery-3.4.1.js}"></script>
    <script th:src="@{/bootstarp/bootstrap.js}"></script>
    <script th:src="@{/bootstarp/bootstrap-paginator.js}"></script>
</head>
<body>

<div class="container">
    <form class="form-horizontal" th:action="@{/replyDetail/add}" method="post" onsubmit="return oo()">
        <input type="hidden" name="invid" th:value="${id}">
        <div class="form-group">
            <h1 class="col-sm-2 control-label page-header">添加回复</h1>
            <br><br>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label" >回复内容:</label>
            <div class="col-sm-6">
                <textarea class="form-control" name="content"></textarea>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-sm-2 control-label">回复昵称:</label>
            <div class="col-sm-6">
                <input type="text" class="form-control" id="" placeholder="回复昵称" name="author">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-6">
                <input type="submit" class="btn btn-info " >
                <a th:href="@{'/replyDetail/main/'+${id}}" class="btn btn-info">返回</a>
            </div>
        </div>
    </form>
</div>
<script th:inline="javascript">
    // <c:if test="${add == 'ok'}">
    //     alert("添加成功")
    // </c:if>
    // <c:if test="${add == 'no'}">
    //     alert("添加失败")
    // </c:if>
    var add = [[${add}]];
    if(add == 'ok'){
        alert("添加回复成功！");
    }else if(add == 'no'){
        alert("添加回复失败！");
    }
</script>
</body>
</html>